<?php
/*
  $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

// the following cPath references come from application_top.php
  $category_depth = 'top';
  if (isset($cPath) && tep_not_null($cPath)) {
    $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
    $cateqories_products = tep_db_fetch_array($categories_products_query);
    if ($cateqories_products['total'] > 0) {
      $category_depth = 'products'; // display products
    } else {
      $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
      $category_parent = tep_db_fetch_array($category_parent_query);
      if ($category_parent['total'] > 0) {
        $category_depth = 'nested'; // navigate through the categories
      } else {
        $category_depth = 'products'; // category has no products, but display the 'no products' message
      }
    }
  }

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table width="897" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="72" background="images/3.jpg"><img src="images/3.jpg"/></td>
<!-- body_text //-->

    <td width="100%" valign="top">

        <?php // start index ?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><?php include 'includes/header_nav.php';?></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="502">


                <script type="text/javascript">

  var swf_width=502;
  var swf_height=289;

  var swf_config = "|2|||0xFFFFFF|0xFF6600||4|3|1|_blank"

  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
  document.write('<param name="movie" value="data/bcastr.swf?bcastr_xml_url=cycle_image.php"><param name="quality" value="high">');
  document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
  document.write('<param name="FlashVars" value="bcastr_config='+swf_config+'">');
  document.write('<embed src="data/bcastr.swf?bcastr_xml_url=cycle_image.php" wmode="opaque" FlashVars="bcastr_config='+swf_config+'" menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
  document.write('</object>');

  </script>

                <!--img src="images/12.jpg" width="502" height="289" /--></td>
                <td valign="top"><table width="100%" height="289" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="55" valign="top"><img src="images/news.jpg" width="55" height="171" /></td>
                    <td valign="top"><table border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td background="images/bg2.jpg"><img src="images/bg2.jpg" width="5" height="30" /></td>
                      </tr>
                      <tr>
                        <td valign="top" width="220">

                        <!--  news start -->

                        <?php

						$article_query = tep_db_query("select ad.articles_name, ad.articles_url, ad.articles_head_desc_tag, a.articles_id, a.articles_date_added, a.articles_last_modified, date_format(a.articles_date_available, '%Y-%m-%d') as articles_date_available, a.articles_status from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad, articles_to_topics at where at.topics_id = 3 and at.articles_id = ad.articles_id and a.articles_id = at.articles_id  and ad.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc limit 3 ");
      while($doc = tep_db_fetch_array($article_query)){


						?>




                          <table border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td><span class="style9"><?php echo date('m/d/Y',strtotime($doc['articles_date_added']));?> </span></td>
                            </tr>
                            <tr>
                              <td><span class="style7"><a href="<?php echo tep_href_link('info.php','id='.$doc['articles_id']);?>"><?php echo $doc['articles_name'];?></a> </span></td>
                            </tr>
                            <tr>
                              <td><p class="news_text"><?php echo $doc['articles_head_desc_tag'];?></p></td>
                            </tr>
                            <tr>
                              <td height="20"><img src="images/4.jpg" width="70" height="2" /></td>
                            </tr>
                          </table>



                          <?php }?>
                          <!--  news end -->

                          </td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td ><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="502" valign="top" >

<style>
.homepagetxt{
 font-size:12px;
 color:#FFF;
 text-align:left;
}
</style>
<table width="502" border="0" cellpadding="0" cellspacing="0" bgcolor="F37B0B" height="160">
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/wel_2.jpg" width="124" height="44" /></td>
      </tr>
      <tr>
        <td align="center"><table width="86%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top" ><div class="homepagetxt">

<?php
$article_id = 18;
$article_query = tep_db_query("select ad.articles_name, ad.articles_description, ad.articles_url, ad.articles_head_desc_tag, a.articles_id, a.articles_date_added, a.articles_last_modified, date_format(a.articles_date_available, '%Y-%m-%d') as articles_date_available, a.articles_status, a.authors_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = '" . (int)$article_id . "' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "'");
      $doc = tep_db_fetch_array($article_query);


echo $doc['articles_description'];

?>
</div>

              </td>
          </tr>
        </table>
          <div align="justify"></div></td>
      </tr>
    </table></td>
    <td width="101" align="left" valign="top"><img src="images/wel_1.jpg" width="101" height="100" /></td>
  </tr>
</table>



</td>
                <td valign="top">




<table width="253" border="0" cellpadding="0" cellspacing="0" background="images/ser_1.jpg" height="160">
  <tr>
    <td><img src="images/ser_2.jpg" width="113" height="48" /></td>
  </tr>
  <tr>
    <td align="center" ><table width="85%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>     
<div class="homepagetxt">
	<?php
$article_id = 19;
$article_query = tep_db_query("select ad.articles_name, ad.articles_description, ad.articles_url, ad.articles_head_desc_tag, a.articles_id, a.articles_date_added, a.articles_last_modified, date_format(a.articles_date_available, '%Y-%m-%d') as articles_date_available, a.articles_status, a.authors_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = '" . (int)$article_id . "' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "'");
      $doc = tep_db_fetch_array($article_query);


echo $doc['articles_description'];

?></div>
	</td>
      </tr>
    </table></td>
  </tr>
  
</table>
















</td>
              </tr>
            </table></td>
          </tr>

        </table>

<?php // end index?>

        </td>
<!-- body_text_eof //-->
    <td width="70" background="images/4.jpg"><img src="images/4.jpg" width="70" height="2" /></td>
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
